-
Notifications
You must be signed in to change notification settings - Fork 0
unify queries #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unify queries #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the agent connection implementation by introducing a unified query interface (query_unified) that consolidates functionality from multiple deprecated methods. The refactoring aims to reduce code duplication by having all query methods delegate to a single implementation.
- Introduces new
QueryResultdataclass andquery_unifiedmethod as the central query interface - Deprecates
query_with_tools,query_with_tracking,query_with_schema, andquery_with_schema_and_trackingmethods, replacing their implementations with calls toquery_unified - Updates mypy configuration to type-check tests and adds error suppression for test-specific issues
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cellsem_llm_client/agents/agent_connection.py | Adds unified query interface with QueryResult dataclass and query_unified method; refactors existing methods to use the new interface; extracts helper methods _run_tool_loop and _build_usage_metrics |
| tests/unit/test_agent_connection.py | Adds unit tests for new query_unified method and deprecation warnings; updates existing test with proper tool definition |
| pyproject.toml | Updates author email, changes development status classifier, and adds mypy error suppression for tests |
| .pre-commit-config.yaml | Updates mypy pre-commit hook to use config file and check both src and tests |
| .github/workflows/test.yml | Adds tests directory to mypy checks in CI workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: dosumis <[email protected]>
Co-authored-by: dosumis <[email protected]>
Accumulate usage metrics across tool call iterations
No description provided.